<!DOCTYPE html>
<html data-ng-app="WfbPlatformApp">
<head>
  <title>久福积分 | 首页</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="renderer" content="webkit">
  <link rel="shortcut icon" href="favicon.ico"/>
  <link rel="stylesheet" type="text/css" href="views/shop/shop.css">
  <link rel="stylesheet" type="text/css" href="./styles/style.css">
  <link rel="stylesheet" type="text/css" href="./styles/index.css">
  <link rel="stylesheet" type="text/css" href="./styles/public.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/swiper/dist/css/swiper.min.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/jqueryr.cxDialog/css/jquery.cxdialog.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/jquery.mloading/dist/jquery.mloading.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/angular-bootstrap/ui-bootstrap-csp.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/bootstrap/dist/css/bootstrap.css">
  <link rel="stylesheet" type="text/css" href="./bower_components/sweetalert/dist/sweetalert.css">
  <link rel="stylesheet" type="text/css" href="views/shop/shop.css">
  <!--gritter css-->
  <link rel="stylesheet" type="text/css" href="./bower_components/jquery.gritter/css/jquery.gritter.css"/>
  <!-- BEGIN DYMANICLY LOADED CSS FILES(all plugin and page related styles must be loaded between GLOBAL and THEME css files ) -->
  <link id="ng_load_plugins_before"/>
  <!-- END DYMANICLY LOADED CSS FILES -->
  <script>
    function success(msg, fun) {
      $.cxDialog({
        title: '消息提示',
        info: msg,
        closeBtn: false
      });
      setTimeout(function () {
        $.cxDialog.close();
        fun()
      }, 2000);
    }

    function error(msg, fun) {
      $.cxDialog({
        title: '消息提示',
        info: msg,
        closeBtn: false
      });
      setTimeout(function () {
        $.cxDialog.close();
        fun()
      }, 2000);
    }

    function confirm(info, fun, nfun) {
      $.cxDialog({
        title: '消息提示',
        info: info,
        okText: '确认购买',
        noText: '我再想想',
        ok: function () {
          fun()
        },
        no: function () {
          $.cxDialog.close();
          nfun();
        }
      });
    }
  </script>
</head>
<body ng-controller="AppController" style="position: static;">
<!-- top 部分 start-->
<div data-ng-include="'templates/topHeader.html'" data-ng-controller="HeaderController">
</div>
<!-- top 部分 end-->
<!-- BEGIN HEADER -->
<div data-ng-include="'templates/menuHeader.html'" data-ng-controller="MenuController">
</div>
<!-- END HEADER -->
<!-- BEGIN ACTUAL CONTENT -->
<div ui-view></div>
<!-- END ACTUAL CONTENT -->
<!-- 在线客服浮层 start -->
<!--<div id="adLayer" style="width: 50px;">
  <div class="ask ">
    <a href="javascript:void(0)" class="adLayerBg"></a>
    <div class="askClass cusmerQList" style="display: none;">
      <dl>
        <dt>您可能遇到的常见问题？</dt>
        <dd>
          <a href="/help" target="_blank">久福积分的公司介绍有么？</a>
          <a href="/account/info" target="_blank">如何设置提现的电子钱包账户？</a>
          <a href="/help" target="_blank">他的公司资质和运营是怎么样的？</a>
          <a href="/account" target="_blank">关于投资和提现有什么费用吗？</a>
          <a href="/account/info" target="_blank">我的密码忘记了怎么办？</a>
          <a href="/account" target="_blank">投资利息从什么时候开始计算？</a>
          <a href="/help" target="_blank">久福积分的安全保障有哪些？</a>
        </dd>
      </dl>
      <div class="clearfix cusmerQFoot bgGreen">
        <span class="fl fcWhite">客服时间：9:00-17:30</span>
        <a class="fr" href="http://www.aikf.com/ask/shenlan001.htm" target="_blank">在线咨询</a>
      </div>
    </div>
  </div>
</div>-->
<!-- 在线客服浮层 -->
<div data-ng-include="'templates/footer.html'" data-ng-controller="FooterController">
</div>
<div id="cxdialog" class="cxdialog">
</div>
<div id="cxdialog_overlay" class="cxdialog_overlay">
</div>
<a href="javascript:void(0);" rel="nofollow" class="backToTop"></a>

<!--[if lt IE 9]>
<script src="bower_components/html5shiv/dist/html5shiv.js"></script>
<![endif]-->

<script src="bower_components/jquery/jquery.min.js" type="text/javascript"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="bower_components/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js" type="text/javascript"></script>

<!-- BEGIN CORE JQUERY PLUGINS -->
<script type="text/javascript" src="bower_components/jqueryr.cxDialog/js/jquery.cxdialog.min.js"></script>
<script type="text/javascript" src="bower_components/jquery.mloading/dist/jquery.mloading.js"></script>
<script type="text/javascript" src="bower_components/swiper/dist/js/swiper.min.js"></script>
<script type="text/javascript" src="scripts/public.js"></script>
<!-- END CORE JQUERY PLUGINS -->

<!-- BEGIN CORE ANGULAR PLUGINS -->
<script src="bower_components/angular/angular.min.js" type="text/javascript"></script>
<script src="bower_components/angular-route/angular-route.min.js" type="text/javascript"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.min.js" type="text/javascript"></script>
<script src="bower_components/angular-touch/angular-touch.min.js" type="text/javascript"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.min.js" type="text/javascript"></script>
<script src="bower_components/angular-ui-router-default/angular-ui-router-default.js" type="text/javascript"></script>
<script src="bower_components/oclazyload/dist/ocLazyLoad.min.js" type="text/javascript"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" type="text/javascript"></script>
<script src="bower_components/ngSweetAlert/sweet-alert.min.js" type="text/javascript"></script>
<script src="bower_components/sweetalert/dist/sweetalert.min.js" type="text/javascript"></script>
<script src="bower_components/angular-md5/angular-md5.min.js" type="text/javascript"></script>
<script src="bower_components/ng-clip/dest/ng-clip.min.js"></script>
<script src="bower_components/zeroclipboard/dist/ZeroClipboard.min.js"></script>
<script src="bower_components/angular-paging/dist/paging.min.js"></script>

<!-- END CORE ANGULAR PLUGINS -->
<!-- BEGIN APP LEVEL ANGULAR SCRIPTS -->
<!--<script src="scripts/directives/main-directive.js"></script>-->
<script src="scripts/services/mainService.js" type="text/javascript"></script>
<!--<script src="scripts/filters/main-filter.js"></script>-->
<script src="scripts/app.js" type="text/javascript" type="text/javascript"></script>
<script src="scripts/controllers/MenuController.js" type="text/javascript"></script>
<script src="bower_components/ng-pagination/page-pagination.js" type="text/javascript"></script>
<!-- END APP LEVEL ANGULAR SCRIPTS -->

<!-- BEGIN APP LEVEL JQUERY SCRIPTS -->
<script type="text/javascript">
  function addCart(e) {
    var id = $(e).attr('data-tid');
    //console.log(id);
    $('body').mLoading('show');

    var investing = false;
    $.ajax({
      type: "post",
      url: 'goods/checkInvest',
      data: {},
      async: false,
      success: function (result) {
        if (result.retCode == '1') {
          investing = result.data.investing;
        }
      }
    });
    //
    if (investing) {
      $('body').mLoading('hide');
      confirm('存在投资中项目，不可重复投资，确认购买？', function () {
        addChartPost(id);
      }, function () {
        $('body').mLoading('hide');
      })
    } else {
      addChartPost(id)
    }
  }

  function addChartPost(id) {
    $.ajax({
      url: 'goods/addChart',
      type: 'post',
      data: {
        goodsid: id
      },
      success: function (json) {
        if (json.retCode == '1') {
          $('body').mLoading('hide');
          success("已成功将商品添加到购物车", function () {
          })
        } else {
          error(json.retMsg, function () {
          })
        }
        $('body').mLoading('hide');
      }
    });
  }
</script>
<!-- END APP LEVEL JQUERY SCRIPTS -->
<!-- END JAVASCRIPTS -->
</body>
</html>
